package com.atguigu03._extends.exer2;

/**
 * ClassName: PersonTest
 * Description:
 *
 * @Author liu
 * @Create 2024/10/27 19:38
 * @Version 1.0
 */
public class Cylinder extends Circle {
    private double length;

    public Cylinder() {
        length = 1;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }
    public double findVolume(){
       // return 3.14*getRadius()*getRadius()*getLength();
        //或
        return super.findArea()*getLength();
    }
}
